<?php
/**
 * Created by JetBrains PhpStorm.
 * User: zhouyang
 * Date: 13-9-06
 * Time: 下午4:31
 * To change this template use File | Settings | File Templates.
 */
class TrendsModel extends Model{
    //根据trend_id 获取trend 信息
    public function get($trend_id){
        return $this->dbreader()->get($trend_id);
    }

    //根据title 获取trend 信息
    public function getTrendInfoByTitle($title){
        return $this->dbreader()->getTrendInfoByTitle($title);
    }

    //获取摘要 列表<带分页>
    public function getTrendList($curr_page,$per_page,$filter = array()){
        return $this->dbreader()->getTrendList($curr_page,$per_page,$filter);
    }

    //添加资讯摘要信息
    public function addTrend($source_id, $title, $trend_type = 1, $link, $user_id, $update_time = null){
        return $this->dbreader()->addTrend($source_id, $title, $trend_type, $link, $user_id, $update_time);
    }

    //删除摘要信息
    public function delTrend($trend_id){
        return $this->dbreader()->delTrend($trend_id);
    }

    //添加资讯摘要信息
    public function editTrend($trend_id, $source_id, $title, $trend_type = 1, $link, $user_id, $update_time = null){
        return $this->dbreader()->editTrend($trend_id, $source_id, $title, $trend_type, $link, $user_id, $update_time);
    }
}